package com.billy.ohos.loadingstatusview.wrapcomponent;

import com.billy.ohos.loadingstatusview.ResourceTable;
import com.billy.ohos.loadingstatusview.util.AbilityUtil;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Component;

public class WrapComponentAbility extends Ability {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        setUIContent(ResourceTable.Layout_ability_wrap_component);
        findComponentById(ResourceTable.Id_btn_load_scroll).setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                AbilityUtil.startAbility(WrapComponentAbility.this, WrapScrollAbility.class);
            }
        });
        findComponentById(ResourceTable.Id_btn_load_list).setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                AbilityUtil.startAbility(WrapComponentAbility.this, WrapListContainerAbility.class);
            }
        });
    }
}
